import request from '@/config/axios'

export interface FollowRecordVO {
  id: number
  entId: string
  type: string
  number: string
  tag: string
  content: string
  callLogId: number
  callStatus: boolean
  callRecordUrl: string
  userId: number
}

// 查询跟进记录分页
export const getFollowRecordPage = async (params) => {
  return await request.get({ url: `/ent/follow-record/page`, params })
}

// 查询跟进记录详情
export const getFollowRecord = async (id: number) => {
  return await request.get({ url: `/ent/follow-record/get?id=` + id })
}

// 新增跟进记录
export const createFollowRecord = async (data: FollowRecordVO) => {
  return await request.post({ url: `/ent/follow-record/create`, data })
}

// 修改跟进记录
export const updateFollowRecord = async (data: FollowRecordVO) => {
  return await request.put({ url: `/ent/follow-record/update`, data })
}

// 删除跟进记录
export const deleteFollowRecord = async (id: number) => {
  return await request.delete({ url: `/ent/follow-record/delete?id=` + id })
}

// 导出跟进记录 Excel
export const exportFollowRecord = async (params) => {
  return await request.download({ url: `/ent/follow-record/export-excel`, params })
}